package cn.kgc.dao;

import cn.kgc.pojo.Train;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author: fighting
 * @date: 2022/2/14
 * @description:
 */
@Mapper
public interface TrainDao {
    //新增考核(1保存=》起草
    int add(Train train);
    //新增考核(2申请复核=》审核中
    int add2(Train train);

    List<Train> sel();
    //查询单个   =>复核查询单个
    Train selById(@RequestParam("trainId") Integer trainId);
    //复核（1驳回
    int fuhe(Train train);
    //复核（2通过
    int fuhe2(Train train);

    int del(Integer trainId);
    //反馈查询单个
    Train FKsel(Integer trainId);
    //修改反馈
    int FKupd(Train train);

    /*
        修改
     */
    Train updsel(Integer trainId);
    int upd(Train train);

    //上传文件=》根据培训名称找到资料、
    String getData(String name);
    //分页+模糊查询 列表
    Page<Train> MoHuFenYe(@RequestParam("name") String name,
                          @RequestParam("status") String status,
                          @RequestParam("startTime") String startTime
    );



}
